<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1.0, user-scalable=0">
<title>选择地址</title>
<link href="${ctxStatic }/site/themes/default/css/boilerplate.css" rel="stylesheet" type="text/css">
<link href="${ctxStatic }/site/themes/default/css/css.css" rel="stylesheet" type="text/css">
<script src="${ctxStatic }/site/themes/default/js/respond.min.js"></script>
<script src="${ctxStatic}/jquery/jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="${ctxStatic}/jquery/jquery-migrate-1.1.1.min.js" type="text/javascript"></script>

<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript"></script>
<script src="${ctxStatic}/site/themes/default/js/hideOptionMenu.js" type="text/javascript"></script>

<script type="text/javascript">
$(function(){
	$("#move").mouseover(function(){
		$("#moveshow").addClass("show");
		$("#moveUl").show();
	});
	
	$("#move").mouseout(function(){
		$("#moveshow").removeClass("show");
		setInterval("$('#moveUl').hide();",5000);
		
	});
});
</script>
<style type="text/css">
.icon_font {
	font: 23px 'ElegantIcons';
	color: #f00;
}
</style>
</head>
<body>
<div class="gridContainer clearfix" id="shopcar">
  <div id="LayoutDiv1" style="min-height:480px;">
    <header>    
		    <ul class="menu">  
		    <span style=" font-size:18px; color:#FFF" class="left biaoti icon_left"   onclick="history.back(-1)" >我的收货地址</span>
					<li id="moveshow" > <a href="#" id="move"  ><span class="icon_menu right"></span></a>
						<ul id="moveUl" style="display:none;">
							<jsp:include page="./right.jsp"></jsp:include>
						</ul>
					</li>			
				</ul>
		    </header>
    <section class="clear">
    
    	<c:forEach items="${storeAddressList}" var="storeAddress">
    		<c:if test="${flowerId ne null && flowerId ne ''}">
	    		<dl style="border:1px #eee solid; border-radius:3px; padding:3%; width:88%; margin:3%; float:left">
	    		 	<a href="${ctxFront }/site/shopping/createFlowerPay?uid=${uid}&wechatId=${wechatId}&addressId=${storeAddress.id}&flowerId=${flowerId}&productNumber=${productNumber}&buyWay=${buyWay}">
				    <dd class="left" style="width:80%; line-height:20px;">
				        <p>店面名称：${storeAddress.name}</p>
				        <p>${storeAddress.province}${storeAddress.city}${storeAddress.county}${fn:substring(storeAddress.detail,0,13)}</p> 
				    </dd>
				  	</a>  
				    <dd class="right" style="width:20%; text-align:center;margin-top: 13px;">&nbsp;</dd>
				</dl>
			</c:if>	
			
			<c:if test="${flowerId eq null || flowerId eq '' }">
	    		<c:if test="${way eq 1}">
				    <dl style="border:1px #eee solid; border-radius:3px; padding:3%; width:88%; margin:3%; float:left">
				         <a href="${ctxFront }/site/shopping/createCartPay?uid=${uid}&wechatId=${wechatId}&addressId=${storeAddress.id}">
					         <dd class="left" style="width:80%; line-height:20px;">
						        <p>店面名称：${storeAddress.name}</p>
						        <p>${storeAddress.province}${storeAddress.city}${storeAddress.county}${fn:substring(storeAddress.detail,0,13)}</p> 
						     </dd>
				         </a>
				        <dd class="right" style="width:20%; text-align:center;margin-top: 13px;">&nbsp;</dd>
				      </dl>
			    </c:if>
			     <c:if test="${way ne 1}">
			      <dl style="border:1px #eee solid; border-radius:3px; padding:3%; width:88%; margin:3%; float:left">
				         <a href="${ctxFront }/site/shopping/createPay?uid=${uid}&wechatId=${wechatId}&addressId=${storeAddress.id}&productId=${productId}&productNumber=${productNumber}&type=2">
					         <dd class="left" style="width:80%; line-height:20px;">
						        <p>店面名称：${storeAddress.name}</p>
						        <p>${storeAddress.province}${storeAddress.city}${storeAddress.county}${fn:substring(storeAddress.detail,0,13)}</p> 
						     </dd>
				         </a>
				        <dd class="right" style="width:20%; text-align:center;margin-top: 13px;">&nbsp;</dd>
				      </dl>
			     </c:if>
		    </c:if>
    	</c:forEach>
    	
    	<c:forEach items="${addresseList}" var="address">
    		<c:if test="${flowerId ne null && flowerId ne ''}">
			    <dl style="border:1px #eee solid; border-radius:3px; padding:3%; width:88%; margin:3%; float:left">
			        <a href="${ctxFront }/site/shopping/createFlowerPay?uid=${uid}&wechatId=${wechatId}&addressId=${address.id}&flowerId=${flowerId}&productNumber=${productNumber}&buyWay=${buyWay}">
			        <dd class="left" style="width:80%; line-height:20px;">
			        	<p>姓名：${address.name}</p>
			        	<p>电话：${address.mobile}</p>
			        	<p>${address.province}${address.city}${address.county}${fn:substring(address.detail,0,13)}</p> </dd>
			        </a>
			        <dd class="right" style="width:20%; text-align:center;margin-top: 13px;">
				        <c:if test="${address.selected eq 1 }">
				       		<span class="icon_enter"></span>
						</c:if>
						<a class="icon_font right" href="${ctxFront }/site/shopping/address?uid=${uid}&wechatId=${wechatId}&flowerId=${flowerId}&productNumber=${productNumber}&type=2&way=${way}&id=${address.id}&buyWay=${buyWay}">&#x6b;</a>
			        </dd>
			      </dl>
		    </c:if>
		    <c:if test="${flowerId eq null || flowerId eq '' }">
	    		<c:if test="${way eq 1}">
				    <dl style="border:1px #eee solid; border-radius:3px; padding:3%; width:88%; margin:3%; float:left">
				         <a href="${ctxFront }/site/shopping/createCartPay?uid=${uid}&wechatId=${wechatId}&addressId=${address.id}">
					         <dd class="left" style="width:80%; line-height:20px;">
					         	<p>姓名：${address.name}</p>
					         	<p>电话：${address.mobile}</p>
					         	<p>${address.province}${address.city}${address.county}${fn:substring(address.detail,0,13)}</p> 
					         </dd>
				         </a>
				        <dd class="right" style="width:20%; text-align:center;margin-top: 13px;">
					        <c:if test="${address.selected eq 1 }">
					       		<span class="icon_enter"></span>
							</c:if>
							<a class="icon_font right" href="${ctxFront }/site/shopping/address?uid=${uid}&wechatId=${wechatId}&type=2&way=${way}&id=${address.id}">&#x6b;</a>
				        </dd>
				      </dl>
			    </c:if>
			     <c:if test="${way ne 1}">
			      <dl style="border:1px #eee solid; border-radius:3px; padding:3%; width:88%; margin:3%; float:left">
				         <a href="${ctxFront }/site/shopping/createPay?uid=${uid}&wechatId=${wechatId}&addressId=${address.id}&productId=${productId}&productNumber=${productNumber}&type=2">
					         <dd class="left" style="width:80%; line-height:20px;">
					         	<p>姓名：${address.name}</p>
					         	<p>电话：${address.mobile}</p>
					         	<p>${address.province}${address.city}${address.county}${fn:substring(address.detail,0,13)}</p> 
					         </dd>
				         </a>
				        <dd class="right" style="width:20%; text-align:center;margin-top: 13px;">
					        <c:if test="${address.selected eq 1 }">
					       		<span class="icon_enter"></span>
							</c:if>
							<a class="icon_font right" href="${ctxFront }/site/shopping/address?uid=${uid}&wechatId=${wechatId}&productId=${productId}&productNumber=${productNumber}&type=2&way=${way}&id=${address.id}">&#x6b;</a>
				        </dd>
				      </dl>
			     </c:if>
		      	
		    </c:if>
    	</c:forEach>
    	
    	<c:if test="${flowerId ne null && flowerId ne ''}">
    		<dl>
			  <dt> 
			   	<input onclick="javascript:window.location.href='${ctxFront }/site/shopping/address?uid=${uid}&wechatId=${wechatId}&flowerId=${flowerId}&productNumber=${productNumber}&type=2&way=${way}&buyWay=${buyWay}'" class="anniu Orange" type="submit" value="+ 新建地址"  style="padding:3%; margin:5%;width: 85%;" />
			  </dt>
			</dl>	
    	</c:if>
    	<c:if test="${flowerId eq null || flowerId eq '' }">
    		<dl>
			  <dt> 
			    <input onclick="javascript:window.location.href='${ctxFront }/site/shopping/address?uid=${uid}&wechatId=${wechatId}&productId=${productId}&productNumber=${productNumber}&type=2&way=${way}'" class="anniu Orange" type="submit" value="+ 新建地址"  style="padding:3%; margin:5%; width: 85%;" />
			  </dt>
			</dl>
    	</c:if>
    	    	
      	<dl>
	      <dt style="padding-left:36%; color:red; "> 
	      	请点击地址，继续购物。
	      </dt>
	    </dl>
    </section>
  </div>
	<div class="jszch">技术支持：<a href="http://www.hdzhx.com/boxin/index.html" >智讯互联</a></div> 
</div>
</body>
</html>

